package com.sen.Midium;

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.*;

public class L015_3SumTest {
    L015_3Sum test = null;

    @Before
    public void setUp(){
        test = new L015_3Sum();
    }

    @After
    public void tearDown(){
        test = null;
    }

    /**
     * !!!!!!!!!! to be solved
     */
    @Ignore
    public void testThreeSum() {
        int[] input = {-1, 0, 1, 2, -1, -4};
        List<List<Integer>> output = test.threeSum(input);
        int[][] expected = {{-1, 0, 1}, {-1, -1, 2}};
        int[][] actual = output.stream()
                .map(l -> l.stream().mapToInt(Integer::intValue).toArray())
                .toArray(int[][]::new);


        assertArrayEquals(expected,actual);
    }
}